package com.wujing.method

object method {

  def main(args: Array[String]): Unit = {
    val dog = new Dog
    dog.name="小花"
    dog.age=12
    dog.sayHello()

//
//    val m1 = new MethodExec
//    m1.len=2
//    m1.width=3
//    println(m1.area)

  }
}

class MethodExec{
  var len=0.0
  var width=0.0

  def area={
    this.len*this.width
  }

}